package com.example.sunny.view.weather

import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Canvas
import android.graphics.drawable.BitmapDrawable
import android.util.Log
import androidx.core.content.ContextCompat
import androidx.core.graphics.BitmapCompat
import com.example.sunny.R
import com.example.sunny.SunnyApplication
import com.github.mikephil.charting.components.XAxis
import com.github.mikephil.charting.renderer.XAxisRenderer
import com.github.mikephil.charting.utils.MPPointF
import com.github.mikephil.charting.utils.Transformer
import com.github.mikephil.charting.utils.Utils
import com.github.mikephil.charting.utils.ViewPortHandler

/**
 * Deprecated
 */
class CustomXAxisRenderer(val viewPortHandler: ViewPortHandler,val xAxis:XAxis,
                          transformer: Transformer,val icons:List<Int>)
    :XAxisRenderer(viewPortHandler,xAxis,transformer) {


    override fun drawLabel(c: Canvas?, formattedLabel: String?,
                           x: Float, y: Float, anchor: MPPointF?, angleDegrees: Float) {
        if (formattedLabel != null) {
            Log.d("CustomXAxisRenderer:formattedLabel",formattedLabel)
        }
        Log.d("CustomXAxisRenderer:x",x.toString())
        Log.d("CustomXAxisRenderer:y",y.toString())
        Log.d("CustomXAxisRenderer:anchor",anchor.toString())
        Log.d("CustomXAxisRenderer:angleDegress",angleDegrees.toString())
        super.drawLabel(c, formattedLabel, x, y, anchor, angleDegrees)
    }

    override fun drawLabels(c: Canvas?, pos: Float, anchor: MPPointF?) {
        Log.d("CustomXAxisRenderer:pos",pos.toString())

        super.drawLabels(c, pos, anchor)
    }
}